package com.chinamobile.ln.ictenterprises.model;

import android.os.Parcel;
import android.os.Parcelable;

public class ChooseContact implements Parcelable
{
    public String name;

    public String address;

    public String type;

    public ChooseContact(String name, String address, String type)
    {
        this.name = name;
        this.address = address;
        this.type = type;
    }

    public ChooseContact(Parcel in)
    {
        name = in.readString();
        address = in.readString();
        type = in.readString();
    }

    @Override
    public int describeContents()
    {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags)
    {
        dest.writeString(name);
        dest.writeString(address);
        dest.writeString(type);
    }

    /**
     * 创建流方法，很重要，不能少
     */
    public static final Parcelable.Creator<ChooseContact> CREATOR = new Parcelable.Creator<ChooseContact>() {
        public ChooseContact createFromParcel(Parcel in)
        {
            return new ChooseContact(in);
        }

        public ChooseContact[] newArray(int size)
        {
            return new ChooseContact[size];
        }
    };
}
